#include <myheader_c_plus.h>
#define STU_NUMS 3
using std::cin;
using std::endl;
using std::cout;
using std::string;
using std::list;
class Student{
public:
    Student(){}
    Student(string name, int age, float chinese_score, float english_score, float math_score)
    :_name(name)
    ,_chinese_score(chinese_score)
    ,_english_score(english_score)
    {

    }

    float getSum(){
        return _chinese_score + _english_score;
    }
    float getChineseScore(){
        return _chinese_score;
    }

    string getName(){
        return _name;
    }

private:
    string _name;
    //int _age;
    float _chinese_score;
    float _english_score;
    //float _math_score;
};


bool cmp(Student & a, Student & b){
    if(a.getSum() == b.getSum()){
        return a.getChineseScore() > b.getChineseScore();
    }else{
        return a.getSum() > b.getSum();
    }
} 
int main(int argc, char *argv[])
{
/*
 *     list<Student> stus;
 *     for(int i = 0; i < STU_NUMS; ++i){
 *         cout << "next" << endl;
 *         string name;
 *         int age;
 *         float chinese_score;
 *         float english_score;
 *         float math_score;
 *         cin >> name >> chinese_score >> english_score;
 *         stus.push_back(Student(name, 0, chinese_score, english_score, 0));
 *     }
 *
 *     //进行排序
 *     stus.sort(cmp);
 *     cout << "======" << endl;
 *
 *     for(auto & ele : stus){
 *         cout << ele.getName() << endl;
 *     }
 */
    



    return 0;
}

